
class ArticleDataBean {
  String? apkLink;
  int? audit;
  String? author;
  bool? canEdit;
  int? chapterId;
  String? chapterName;
  bool? collect;
  int? courseId;
  String? desc;
  String? descMd;
  String? envelopePic;
  bool? fresh;
  String? host;
  int? id;
  String? link;
  String? niceDate;
  String? niceShareDate;
  String? origin;
  String? prefix;
  String? projectLink;
  int? publishTime;
  int? realSuperChapterId;
  int? selfVisible;
  int? shareDate;
  String? shareUser;
  int? superChapterId;
  String? superChapterName;
  List<HomeArticleDataTag>? tags;
  String? title;
  int? type;
  int? userId;
  int? visible;
  int? zan;

  ArticleDataBean(
      {this.apkLink,
      this.audit,
      this.author,
      this.canEdit,
      this.chapterId,
      this.chapterName,
      this.collect,
      this.courseId,
      this.desc,
      this.descMd,
      this.envelopePic,
      this.fresh,
      this.host,
      this.id,
      this.link,
      this.niceDate,
      this.niceShareDate,
      this.origin,
      this.prefix,
      this.projectLink,
      this.publishTime,
      this.realSuperChapterId,
      this.selfVisible,
      this.shareDate,
      this.shareUser,
      this.superChapterId,
      this.superChapterName,
      this.tags,
      this.title,
      this.type,
      this.userId,
      this.visible,
      this.zan});

  ArticleDataBean.fromJson(Map<String, dynamic> json) {
    if (json["apkLink"] is String) this.apkLink = json["apkLink"];
    if (json["audit"] is int) this.audit = json["audit"];
    if (json["author"] is String) this.author = json["author"];
    if (json["canEdit"] is bool) this.canEdit = json["canEdit"];
    if (json["chapterId"] is int) this.chapterId = json["chapterId"];
    if (json["chapterName"] is String) this.chapterName = json["chapterName"];
    if (json["collect"] is bool) this.collect = json["collect"];
    if (json["courseId"] is int) this.courseId = json["courseId"];
    if (json["desc"] is String) this.desc = json["desc"];
    if (json["descMd"] is String) this.descMd = json["descMd"];
    if (json["envelopePic"] is String) this.envelopePic = json["envelopePic"];
    if (json["fresh"] is bool) this.fresh = json["fresh"];
    if (json["host"] is String) this.host = json["host"];
    if (json["id"] is int) this.id = json["id"];
    if (json["link"] is String) this.link = json["link"];
    if (json["niceDate"] is String) this.niceDate = json["niceDate"];
    if (json["niceShareDate"] is String)
      this.niceShareDate = json["niceShareDate"];
    if (json["origin"] is String) this.origin = json["origin"];
    if (json["prefix"] is String) this.prefix = json["prefix"];
    if (json["projectLink"] is String) this.projectLink = json["projectLink"];
    if (json["publishTime"] is int) this.publishTime = json["publishTime"];
    if (json["realSuperChapterId"] is int)
      this.realSuperChapterId = json["realSuperChapterId"];
    if (json["selfVisible"] is int) this.selfVisible = json["selfVisible"];
    if (json["shareDate"] is int) this.shareDate = json["shareDate"];
    if (json["shareUser"] is String) this.shareUser = json["shareUser"];
    if (json["superChapterId"] is int)
      this.superChapterId = json["superChapterId"];
    if (json["superChapterName"] is String)
      this.superChapterName = json["superChapterName"];
    if (json["tags"] is List)
      this.tags = json["tags"] == null
          ? null
          : (json["tags"] as List)
              .map((e) => HomeArticleDataTag.fromJson(e))
              .toList();
    if (json["title"] is String) this.title = json["title"];
    if (json["type"] is int) this.type = json["type"];
    if (json["userId"] is int) this.userId = json["userId"];
    if (json["visible"] is int) this.visible = json["visible"];
    if (json["zan"] is int) this.zan = json["zan"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data["apkLink"] = this.apkLink;
    data["audit"] = this.audit;
    data["author"] = this.author;
    data["canEdit"] = this.canEdit;
    data["chapterId"] = this.chapterId;
    data["chapterName"] = this.chapterName;
    data["collect"] = this.collect;
    data["courseId"] = this.courseId;
    data["desc"] = this.desc;
    data["descMd"] = this.descMd;
    data["envelopePic"] = this.envelopePic;
    data["fresh"] = this.fresh;
    data["host"] = this.host;
    data["id"] = this.id;
    data["link"] = this.link;
    data["niceDate"] = this.niceDate;
    data["niceShareDate"] = this.niceShareDate;
    data["origin"] = this.origin;
    data["prefix"] = this.prefix;
    data["projectLink"] = this.projectLink;
    data["publishTime"] = this.publishTime;
    data["realSuperChapterId"] = this.realSuperChapterId;
    data["selfVisible"] = this.selfVisible;
    data["shareDate"] = this.shareDate;
    data["shareUser"] = this.shareUser;
    data["superChapterId"] = this.superChapterId;
    data["superChapterName"] = this.superChapterName;
    if (this.tags != null)
      data["tags"] = this.tags?.map((e) => e.toJson()).toList();
    data["title"] = this.title;
    data["type"] = this.type;
    data["userId"] = this.userId;
    data["visible"] = this.visible;
    data["zan"] = this.zan;
    return data;
  }
}

class HomeArticleDataTag {
  String? name;
  String? url;

  HomeArticleDataTag({this.name, this.url});

  HomeArticleDataTag.fromJson(Map<String, dynamic> json) {
    if (json["name"] is String) this.name = json["name"];
    if (json["url"] is String) this.url = json["url"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['url'] = this.url;
    return data;
  }
}
